package org.travel.app.mapper;

import org.apache.ibatis.annotations.Param;
import org.travel.app.entity.CouponDetail;
import org.travel.app.entity.Order;
import org.travel.app.entity.ticket.TicketOrderMsg;

import java.util.List;

/**
 * @author nmm
 * @date 2024-12-2024/12/10
 * @deriction njm......
 */
public interface OrderMapper {

    /**
     * 添加订单
     * @param order
     */
    void saveOrder(Order order);

    /**
     * 添加订单优惠详情
     * @param couponDetail:具体优惠信息
     */
    void addOrderCoupon(CouponDetail couponDetail);


    /**
     * 查询(票种加订单)信息
     * @return
     */
    List<Order> getOrderList(@Param("userId") int userId);

    TicketOrderMsg getOrderByOrderId(@Param("orderId") String orderId);

    /**
     * 修改订单状态
     * @param order
     */
    void   updateOrderStatusByOrderId(Order order);

}